import request from '@/utils/request'

// 获取工段槽位状态
export function getSectionSlots(sectionName) {
  return request({
    url: '/workshop/section/' + sectionName + '/slots',
    method: 'get'
  })
}

// 刷新工段槽位状态
export function refreshSectionSlots(sectionName) {
  return request({
    url: '/workshop/section/' + sectionName + '/refresh',
    method: 'get'
  })
}

// 保存槽位设置
export function saveSlotSetting(data) {
  return request({
    url: '/workshop/slot/setting',
    method: 'post',
    data: data
  })
}

// 获取槽位时间设置
export function getSlotTiming(businessSlotNo) {
  return request({
    url: '/workshop/slot/timing',
    method: 'get',
    params: { businessSlotNo }
  })
}